package bean;

import java.time.LocalDateTime;
import java.util.Objects;

public class Users {
    private Integer id;
    private String tel;
    private String name;
    private String pwd;
    private String email;
    private String sex;
    private LocalDateTime createTime;

    public Users() {
        super();
    }

    public Users(Integer id, String tel, String name, String pwd, String email, String sex, LocalDateTime createTime) {
        this.id = id;
        this.tel = tel;
        this.name = name;
        this.pwd = pwd;
        this.email = email;
        this.sex = sex;
        this.createTime = createTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Users users = (Users) o;
        return Objects.equals(name, users.name) && Objects.equals(pwd, users.pwd);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, pwd);
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", tel='" + tel + '\'' +
                ", name='" + name + '\'' +
                ", pwd='" + pwd + '\'' +
                ", email='" + email + '\'' +
                ", sex='" + sex + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
